package cn.edu.sdjzu.xg23.kcsj01_backend.exception;


import cn.edu.sdjzu.xg23.kcsj01_backend.utils.ResultCodeEnum;

public class BusinessException extends RuntimeException {
    private String code;

    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.msg);
        this.code = resultCodeEnum.code;
    }

    public String getCode() {
        return code;
    }
}